
out = open('result_speech_txt_log2.txt','w')
result = open('result_combine.txt').readlines()
dic = {}
for re in result:
    re = re.strip()
    dic[re.split('\t')[0]] = re.split('\t')[1]
    
log = open('log_role.txt').readlines()
for i in range(len(log)):
    filename = log[i].split('\t')[0].split('.')[0]
    #print log[i].replace(log[i].split('\t')[4],dic[filename])
    out.write('G:\\')
    out.write(log[i].replace(log[i].split('\t')[4],dic[filename]).strip() + '\n')

out.close()    
